package atguigu.gxstest;

public class WIndowsTicket {

    public static void main(String[] args) {
        Ticket t1 = new Ticket("窗口1");
        Ticket t2 = new Ticket("窗口2");
        Ticket t3 = new Ticket("窗口3");
t1.start();
t2.start();
t3.start();
    }

}

class Ticket extends Thread{
    private static int total = 100;

    @Override
    public void run() {
        while (true){
            System.out.println(Thread.currentThread().getName()+":"+total);
            total --;
            if (total < 0){
                break;
            }
        }
    }

    public Ticket(String name){
        super(name);
    }
}